home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 815 b | 42 lines | [TEXT/CWIE] |
- // BufferOf.cp
-
- #ifndef BufferOf_h
- #include "BufferOf.h"
- #endif
- #ifndef ConstBufferOf_h
- #include "ConstBufferOf.h"
- #endif
-
- template < class Element >
- BufferOf<Element>::BufferOf( ArrayType theSpace )
- : space( theSpace ),
- mark( 0 )
- {
- Assert( !theSpace.Null() );
- }
-
- template < class Element >
- void BufferOf<Element>::Reset( ArrayType theSpace )
- {
- Assert( !theSpace.Null() );
- space = theSpace;
- mark = 0;
- }
-
- template < class Element >
- void BufferOf<Element>::operator<<( ConstArrayType toWrite )
- {
- Assert( toWrite.Length() <= UnusedLength() );
- mark += Unused() << toWrite;
- }
-
- template < class Element >
- void BufferOf<Element>::operator<<( ConstBufferType& source )
- {
- uint32 amount = Unused() << source.Unused();
- AdvanceMark( amount );
- source.AdvanceMark( amount );
- }
-
- #include "ArrayOf.cp"
-